package com.hottop.system.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hottop.system.mapper.SysAnnouncementMapper;
import com.hottop.system.domain.SysAnnouncement;
import com.hottop.system.service.ISysAnnouncementService;

/**
 * 系统公告数据Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-02-19
 */
@Service
public class SysAnnouncementServiceImpl extends ServiceImpl<SysAnnouncementMapper, SysAnnouncement> implements ISysAnnouncementService
{
    @Autowired
    private SysAnnouncementMapper sysAnnouncementMapper;

    /**
     * 查询系统公告数据
     * 
     * @param id 系统公告数据主键
     * @return 系统公告数据
     */
    @Override
    public SysAnnouncement selectSysAnnouncementById(Long id)
    {
        return sysAnnouncementMapper.selectSysAnnouncementById(id);
    }

    /**
     * 查询系统公告数据列表
     * 
     * @param sysAnnouncement 系统公告数据
     * @return 系统公告数据
     */
    @Override
    public List<SysAnnouncement> selectSysAnnouncementList(SysAnnouncement sysAnnouncement)
    {
        return sysAnnouncementMapper.selectSysAnnouncementList(sysAnnouncement);
    }

    /**
     * 新增系统公告数据
     * 
     * @param sysAnnouncement 系统公告数据
     * @return 结果
     */
    @Override
    public int insertSysAnnouncement(SysAnnouncement sysAnnouncement)
    {

        return sysAnnouncementMapper.insertSysAnnouncement(sysAnnouncement);
    }

    /**
     * 修改系统公告数据
     * 
     * @param sysAnnouncement 系统公告数据
     * @return 结果
     */
    @Override
    public int updateSysAnnouncement(SysAnnouncement sysAnnouncement)
    {
        return sysAnnouncementMapper.updateSysAnnouncement(sysAnnouncement);
    }

    /**
     * 批量删除系统公告数据
     * 
     * @param ids 需要删除的系统公告数据主键
     * @return 结果
     */
    @Override
    public int deleteSysAnnouncementByIds(Long[] ids)
    {
        return sysAnnouncementMapper.deleteSysAnnouncementByIds(ids);
    }

    /**
     * 删除系统公告数据信息
     * 
     * @param id 系统公告数据主键
     * @return 结果
     */
    @Override
    public int deleteSysAnnouncementById(Long id)
    {
        return sysAnnouncementMapper.deleteSysAnnouncementById(id);
    }
}
